<template>
  <div>
    <el-table
        :data="tableData"
        style="width: 100%">
      <el-table-column prop="id" label="编号" header-align="center" align="center" width="180"></el-table-column>
      <el-table-column prop="carId" label="车牌号" header-align="center" align="center" width="180"></el-table-column>
      <el-table-column prop="cardId" header-align="center" align="center" label="身份证号码"></el-table-column>
      <el-table-column prop="ownerName" header-align="center" align="center" label="车主姓名"></el-table-column>
      <el-table-column prop="ownerPhone" header-align="center" align="center" label="联系电话"></el-table-column>
    </el-table>


  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [],
    };
  },
  methods: {

    //获取车辆信息
    loadParkingSpaceList() {
      let  cardId = localStorage.getItem('cardId');
      console.log(cardId)
      let url = 'http://localhost:8080/car/getCarList?cardId='+cardId;
      this.axios.get(url).then((response) => {
        let responseBody = response.data;
        console.log(this.editForm)
        if (responseBody.code == 200) {
          this.tableData = responseBody.data;
        }
      });

    }
  }
  ,
  created() {
    this.loadParkingSpaceList()
  }
}
</script>
